package com.caishi.lkx.user.model;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zzw.common.entity.impl.BSDUEntity;
import com.zzw.common.service.model.NameModel;
import com.zzw.common.service.model.base.BaseTreeModel;
import lombok.*;

import java.util.List;

/**
 * @author by keray
 * date:2021/4/7 10:49 上午
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("cu_action")
public class ActionModel extends BSDUEntity<ActionModel> implements BaseTreeModel<ActionModel, String> , NameModel<ActionModel, String> {
    private String name;
    private String remark;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String parentId;

    @TableField(exist = false)
    private ActionModel parent;

    @TableField(exist = false)
    private List<ActionModel> children;
}
